import requests


class IhrmLoginApi:
    def login(self, req_data):
        res = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                            json=req_data)
        return res

# 自测
if __name__ == "__main__":
    i = IhrmLoginApi()
    res_data = {"mobile": "13800000002", "password": "123456"}
    result = i.login(res_data)
    print("登陆成功：", result.json())
